

<!DOCTYPE html>
<html lang="zh-CN" data-default-color-scheme=auto>



<head>
  <meta charset="UTF-8">
  <link rel="apple-touch-icon" sizes="76x76" href="/img/egg.png">
  <link rel="icon" href="/img/egg.png">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=5.0, shrink-to-fit=no">
  <meta http-equiv="x-ua-compatible" content="ie=edge">
  
  <meta name="theme-color" content="#2f4154">
  <meta name="author" content="十一的蛋炒饭">
  <meta name="keywords" content="">
  
    <meta name="description" content="Web开发笔记1 前后端分离开发 前后端混合开发存在的问题：  沟通成本高 分工不明确 项目不便管理、维护和扩展  1、 前后端分离开发前后端分离开发是一种现代软件开发架构，它将应用程序分为前后两部分进行独立的开发。 前端（也称为展示层）主要负责用户的界面和交互设计。后端（也称为逻辑层或服务器端）则负责数据处理、业务逻辑以及API服务的提供。  开后端分离开发的流程共有五步：  2、 API接口由">
<meta property="og:type" content="article">
<meta property="og:title" content="Web 开发笔记1 | 前后端分离开发、Vue2项目开发">
<meta property="og:url" content="http://example.com/2024/03/06/Web-%E5%BC%80%E5%8F%91%E7%AC%94%E8%AE%B01-%E5%89%8D%E5%90%8E%E7%AB%AF%E5%88%86%E7%A6%BB%E5%BC%80%E5%8F%91%E3%80%81Vue2%E9%A1%B9%E7%9B%AE%E5%BC%80%E5%8F%91/index.html">
<meta property="og:site_name" content="十一的蛋炒饭的博客">
<meta property="og:description" content="Web开发笔记1 前后端分离开发 前后端混合开发存在的问题：  沟通成本高 分工不明确 项目不便管理、维护和扩展  1、 前后端分离开发前后端分离开发是一种现代软件开发架构，它将应用程序分为前后两部分进行独立的开发。 前端（也称为展示层）主要负责用户的界面和交互设计。后端（也称为逻辑层或服务器端）则负责数据处理、业务逻辑以及API服务的提供。  开后端分离开发的流程共有五步：  2、 API接口由">
<meta property="og:locale" content="zh_CN">
<meta property="og:image" content="https://uni-pic-bed.oss-cn-hangzhou.aliyuncs.com/blog2024/202403061238734.png">
<meta property="og:image" content="https://uni-pic-bed.oss-cn-hangzhou.aliyuncs.com/blog2024/202403061244026.png">
<meta property="og:image" content="https://uni-pic-bed.oss-cn-hangzhou.aliyuncs.com/blog2024/202403061248907.png">
<meta property="og:image" content="https://uni-pic-bed.oss-cn-hangzhou.aliyuncs.com/blog2024/202403061614148.png">
<meta property="og:image" content="https://uni-pic-bed.oss-cn-hangzhou.aliyuncs.com/blog2024/202403061621432.png">
<meta property="og:image" content="https://uni-pic-bed.oss-cn-hangzhou.aliyuncs.com/blog2024/202403121208550.png">
<meta property="article:published_time" content="2024-03-06T04:09:00.000Z">
<meta property="article:modified_time" content="2024-03-12T04:10:47.104Z">
<meta property="article:author" content="十一的蛋炒饭">
<meta property="article:tag" content="Web">
<meta property="article:tag" content="Vue">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:image" content="https://uni-pic-bed.oss-cn-hangzhou.aliyuncs.com/blog2024/202403061238734.png">
  
  
  
  <title>Web 开发笔记1 | 前后端分离开发、Vue2项目开发 - 十一的蛋炒饭的博客</title>

  <link  rel="stylesheet" href="https://lib.baomitu.com/twitter-bootstrap/4.6.1/css/bootstrap.min.css" />



  <link  rel="stylesheet" href="https://lib.baomitu.com/github-markdown-css/4.0.0/github-markdown.min.css" />

  <link  rel="stylesheet" href="https://lib.baomitu.com/hint.css/2.7.0/hint.min.css" />

  <link  rel="stylesheet" href="https://lib.baomitu.com/fancybox/3.5.7/jquery.fancybox.min.css" />



<!-- 主题依赖的图标库，不要自行修改 -->
<!-- Do not modify the link that theme dependent icons -->

<link rel="stylesheet" href="//at.alicdn.com/t/font_1749284_hj8rtnfg7um.css">



<link rel="stylesheet" href="//at.alicdn.com/t/font_1736178_lbnruvf0jn.css">


<link  rel="stylesheet" href="/css/main.css" />


  <link id="highlight-css" rel="stylesheet" href="/css/highlight.css" />
  
    <link id="highlight-css-dark" rel="stylesheet" href="/css/highlight-dark.css" />
  




  <script id="fluid-configs">
    var Fluid = window.Fluid || {};
    Fluid.ctx = Object.assign({}, Fluid.ctx)
    var CONFIG = {"hostname":"example.com","root":"/","version":"1.9.7","typing":{"enable":true,"typeSpeed":60,"cursorChar":"","loop":false,"scope":["home"]},"anchorjs":{"enable":true,"element":"h1,h2,h3,h4,h5,h6","placement":"left","visible":"hover","icon":"§"},"progressbar":{"enable":true,"height_px":3,"color":"#29d","options":{"showSpinner":false,"trickleSpeed":100}},"code_language":{"enable":true,"default":"TEXT"},"copy_btn":true,"image_caption":{"enable":true},"image_zoom":{"enable":true,"img_url_replace":["",""]},"toc":{"enable":true,"placement":"right","headingSelector":"h1,h2,h3,h4,h5,h6","collapseDepth":0},"lazyload":{"enable":true,"loading_img":"/img/loading.gif","onlypost":false,"offset_factor":2},"web_analytics":{"enable":false,"follow_dnt":true,"baidu":null,"google":{"measurement_id":null},"tencent":{"sid":null,"cid":null},"woyaola":null,"cnzz":null,"leancloud":{"app_id":null,"app_key":null,"server_url":null,"path":"window.location.pathname","ignore_local":false}},"search_path":"/local-search.xml","include_content_in_search":true};

    if (CONFIG.web_analytics.follow_dnt) {
      var dntVal = navigator.doNotTrack || window.doNotTrack || navigator.msDoNotTrack;
      Fluid.ctx.dnt = dntVal && (dntVal.startsWith('1') || dntVal.startsWith('yes') || dntVal.startsWith('on'));
    }
  </script>
  <script  src="/js/utils.js" ></script>
  <script  src="/js/color-schema.js" ></script>
  


  
<meta name="generator" content="Hexo 7.1.1"></head>


<body>
  

  <header>
    

<div class="header-inner" style="height: 70vh;">
  <nav id="navbar" class="navbar fixed-top  navbar-expand-lg navbar-dark scrolling-navbar">
  <div class="container">
    <a class="navbar-brand" href="/">
      <strong>十一的蛋炒饭 的博客</strong>
    </a>

    <button id="navbar-toggler-btn" class="navbar-toggler" type="button" data-toggle="collapse"
            data-target="#navbarSupportedContent"
            aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
      <div class="animated-icon"><span></span><span></span><span></span></div>
    </button>

    <!-- Collapsible content -->
    <div class="collapse navbar-collapse" id="navbarSupportedContent">
      <ul class="navbar-nav ml-auto text-center">
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/" target="_self">
                <i class="iconfont icon-home-fill"></i>
                <span>首页</span>
              </a>
            </li>
          
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/archives/" target="_self">
                <i class="iconfont icon-archive-fill"></i>
                <span>归档</span>
              </a>
            </li>
          
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/categories/" target="_self">
                <i class="iconfont icon-category-fill"></i>
                <span>分类</span>
              </a>
            </li>
          
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/tags/" target="_self">
                <i class="iconfont icon-tags-fill"></i>
                <span>标签</span>
              </a>
            </li>
          
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/about/" target="_self">
                <i class="iconfont icon-user-fill"></i>
                <span>关于</span>
              </a>
            </li>
          
        
        
          <li class="nav-item" id="search-btn">
            <a class="nav-link" target="_self" href="javascript:;" data-toggle="modal" data-target="#modalSearch" aria-label="Search">
              <i class="iconfont icon-search"></i>
            </a>
          </li>
          
        
        
          <li class="nav-item" id="color-toggle-btn">
            <a class="nav-link" target="_self" href="javascript:;" aria-label="Color Toggle">
              <i class="iconfont icon-dark" id="color-toggle-icon"></i>
            </a>
          </li>
        
      </ul>
    </div>
  </div>
</nav>

  

<div id="banner" class="banner" parallax=true
     style="background: url('/img/win7.jpg') no-repeat center center; background-size: cover;">
  <div class="full-bg-img">
    <div class="mask flex-center" style="background-color: rgba(0, 0, 0, 0.3)">
      <div class="banner-text text-center fade-in-up">
        <div class="h2">
          
            <span id="subtitle">Web 开发笔记1 | 前后端分离开发、Vue2项目开发</span>
          
        </div>

        
          
  <div class="mt-3">
    
    
      <span class="post-meta">
        <i class="iconfont icon-date-fill" aria-hidden="true"></i>
        <time datetime="2024-03-06 12:09" pubdate>
          2024年3月6日 中午
        </time>
      </span>
    
  </div>

  <div class="mt-1">
    
      <span class="post-meta mr-2">
        <i class="iconfont icon-chart"></i>
        
          836 字
        
      </span>
    

    
      <span class="post-meta mr-2">
        <i class="iconfont icon-clock-fill"></i>
        
        
        
          7 分钟
        
      </span>
    

    
    
  </div>


        
      </div>

      
    </div>
  </div>
</div>

</div>

  </header>

  <main>
    
      

<div class="container-fluid nopadding-x">
  <div class="row nomargin-x">
    <div class="side-col d-none d-lg-block col-lg-2">
      
  <aside class="sidebar category-bar" style="margin-right: -1rem">
    





<div class="category-list">
  
  
    
    
    
    <div class="category row nomargin-x">
      <a class="category-item 
          list-group-item category-item-action col-10 col-md-11 col-xm-11" title="Web开发"
        id="heading-3b451acfb78b69289662a6dd4d9d042c" role="tab" data-toggle="collapse" href="#collapse-3b451acfb78b69289662a6dd4d9d042c"
        aria-expanded="true"
      >
        Web开发
        <span class="list-group-count">(3)</span>
        <i class="iconfont icon-arrowright"></i>
      </a>
      
      <div class="category-collapse collapse show" id="collapse-3b451acfb78b69289662a6dd4d9d042c"
           role="tabpanel" aria-labelledby="heading-3b451acfb78b69289662a6dd4d9d042c">
        
        
          
  <div class="category-post-list">
    
    
      
      
        <a href="/2024/03/06/Web-%E5%BC%80%E5%8F%91%E7%AC%94%E8%AE%B01-%E5%89%8D%E5%90%8E%E7%AB%AF%E5%88%86%E7%A6%BB%E5%BC%80%E5%8F%91%E3%80%81Vue2%E9%A1%B9%E7%9B%AE%E5%BC%80%E5%8F%91/" title="Web 开发笔记1 | 前后端分离开发、Vue2项目开发"
           class="list-group-item list-group-item-action
           active">
          <span class="category-post">Web 开发笔记1 | 前后端分离开发、Vue2项目开发</span>
        </a>
      
    
      
      
        <a href="/2024/03/11/Web%E5%BC%80%E5%8F%91%E7%AC%94%E8%AE%B02-%E5%90%8E%E7%AB%AF-Spring-Boot%E3%80%81HTTP%E5%8D%8F%E8%AE%AE%E3%80%81Web%E6%9C%8D%E5%8A%A1%E5%99%A8%E3%80%81Tomcat/" title="Web 开发笔记2 | 后端 Spring Boot、HTTP协议、Web服务器、Tomcat"
           class="list-group-item list-group-item-action
           ">
          <span class="category-post">Web 开发笔记2 | 后端 Spring Boot、HTTP协议、Web服务器、Tomcat</span>
        </a>
      
    
      
      
        <a href="/2024/03/12/Web-%E5%BC%80%E5%8F%91%E7%AC%94%E8%AE%B03-Postman-%E3%80%81SpringBoot-%E8%8E%B7%E5%8F%96%E4%B8%8D%E5%90%8C%E7%9A%84%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0%E3%80%81Spring-Boot-%E5%93%8D%E5%BA%94%E6%95%B0%E6%8D%AE%E3%80%81Spring-%E7%9A%84-IOC%E6%8E%A7%E5%88%B6%E5%8F%8D%E8%BD%AC%E5%92%8CDI-%E4%BE%9D%E8%B5%96%E6%B3%A8%E5%85%A5%E3%80%81%E9%A1%B9%E7%9B%AE%E5%88%86%E5%B1%82%E8%A7%A3%E8%80%A6%E7%9A%84%E5%AE%9E%E7%8E%B0%E3%80%81Bean-%E6%B3%A8%E5%85%A5%E7%9A%84%E6%B3%A8%E8%A7%A3/" title="Web 开发笔记3 | Postman 、SpringBoot 获取不同的请求参数、Spring Boot 响应数据、Spring 的 IOC控制反转和DI 依赖注入、项目分层解耦的实现、Bean 注入的注解"
           class="list-group-item list-group-item-action
           ">
          <span class="category-post">Web 开发笔记3 | Postman 、SpringBoot 获取不同的请求参数、Spring Boot 响应数据、Spring 的 IOC控制反转和DI 依赖注入、项目分层解耦的实现、Bean 注入的注解</span>
        </a>
      
    
  </div>

        
      </div>
    </div>
  
</div>


  </aside>


    </div>

    <div class="col-lg-8 nopadding-x-md">
      <div class="container nopadding-x-md" id="board-ctn">
        <div id="board">
          <article class="post-content mx-auto">
            <h1 id="seo-header">Web 开发笔记1 | 前后端分离开发、Vue2项目开发</h1>
            
              <p id="updated-time" class="note note-info" style="display: none">
                
                  
                    本文最后更新于 2024-03-12T12:10:47+08:00
                  
                  

                
              </p>
            
            
              <div class="markdown-body">
                
                <p>Web开发笔记1 前后端分离开发</p>
<p>前后端混合开发存在的问题：</p>
<ul>
<li>沟通成本高</li>
<li>分工不明确</li>
<li>项目不便管理、维护和扩展</li>
</ul>
<h2 id="1、-前后端分离开发"><a href="#1、-前后端分离开发" class="headerlink" title="1、 前后端分离开发"></a>1、 前后端分离开发</h2><p>前后端分离开发是一种现代软件开发架构，它将应用程序分为前后两部分进行独立的开发。</p>
<p>前端（也称为展示层）主要负责用户的界面和交互设计。<br>后端（也称为逻辑层或服务器端）则负责数据处理、业务逻辑以及API服务的提供。</p>
<p><img src="https://uni-pic-bed.oss-cn-hangzhou.aliyuncs.com/blog2024/202403061238734.png" srcset="/img/loading.gif" lazyload alt="前后端分离开发示意图"></p>
<p>开后端分离开发的流程共有五步：</p>
<p><img src="https://uni-pic-bed.oss-cn-hangzhou.aliyuncs.com/blog2024/202403061244026.png" srcset="/img/loading.gif" lazyload alt="image-20240306124410987"></p>
<h2 id="2、-API接口"><a href="#2、-API接口" class="headerlink" title="2、 API接口"></a>2、 API接口</h2><p>由此可见，接口文档在Web项目开发中非常重要。</p>
<p>API（Application Programming Interface）文档即接口文档，现有一些网站和软件支持编写API接口，有助于编写接口文档。比如，国产软件<a target="_blank" rel="noopener" href="https://apifox.com/?utm_source=baidu_pinzhuan&utm_medium=sem&utm_campaign=pinzhuan&utm_content=pinzhuan&utm_term=apifox">Apifox </a>。</p>
<p><img src="https://uni-pic-bed.oss-cn-hangzhou.aliyuncs.com/blog2024/202403061248907.png" srcset="/img/loading.gif" lazyload alt="Apifox 软件界面截图"></p>
<h2 id="3、-前端开发工程化"><a href="#3、-前端开发工程化" class="headerlink" title="3、 前端开发工程化"></a>3、 前端开发工程化</h2><p>前端工程化：指在企业级的前端项目开发中，把前端开发所需的工具、技术、流程、经验等进行规范化、标准化。</p>
<p>前端工程化包括以下四个部分：</p>
<ul>
<li>模块化：HTML、JS、CSS。</li>
<li>组件化：UI结构、样式、行为。</li>
<li>规范化：目录结构、编码、接口。</li>
<li>自动化：构建、部署、测试。</li>
</ul>
<h3 id="3-1-Vue-CLI"><a href="#3-1-Vue-CLI" class="headerlink" title="3.1 Vue-CLI"></a>3.1 Vue-CLI</h3><p><a target="_blank" rel="noopener" href="https://cli.vuejs.org/zh/guide/">Vue CLI </a>是一个基于 Vue.js 进行快速开发的完整系统，其提供的功能有：</p>
<ul>
<li>统一的目录结构</li>
<li>本地调试</li>
<li>热部署（修改文件后，网站能立马更新）</li>
<li>单元测试</li>
<li>集成打包上线</li>
</ul>
<p>依赖环境：<a target="_blank" rel="noopener" href="https://nodejs.org/">Node.js</a></p>
<h4 id="1-安装-Node-js"><a href="#1-安装-Node-js" class="headerlink" title="1. 安装 Node.js"></a>1. 安装 Node.js</h4><p>安装Node.js一共有3个步骤，分别是：</p>
<ol>
<li>下载</li>
<li>配置路径</li>
<li>替换镜像源</li>
</ol>
<p><strong>第1步，下载Nodejs</strong></p>
<p>Node.js 官方下载：<a target="_blank" rel="noopener" href="https://nodejs.org/">https://nodejs.org</a></p>
<p>安装好Node.js后，首先可在命令行输入<code>node -v</code> 检查是否安装成功。</p>
<p>若安装成功，则会输出Node的版本，成功后命令行将支持 <code>npm</code> 开头的指令</p>
<p><strong>第2步，配置npm的全局安装路径</strong></p>
<p>比如我的安装目录在：E:\nodejs</p>
<p>在命令行中输入以下指令， 以设置路径：</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs shell">npm config set prefix &quot;E:\nodejs&quot;<br></code></pre></td></tr></table></figure>

<p>设置好后，查看是否设置成功：</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs shell">npm config get prefix<br></code></pre></td></tr></table></figure>

<p><strong>第3步，使用命令切换npm的下载源，提高下载速度</strong></p>
<p>淘宝镜像源地址：<a target="_blank" rel="noopener" href="https://registry.npmmirror.com/">registry.npmmirror.com</a>，替换前，建议先访问一下是否还有效。</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs shell">npm config set registry https://registry.npm.taobao.org<br></code></pre></td></tr></table></figure>

<p>npm config set registry <a target="_blank" rel="noopener" href="https://registry.npm.taobao.org/">https://registry.npm.taobao.org</a></p>
<h4 id="2-安装-Vue-CLI"><a href="#2-安装-Vue-CLI" class="headerlink" title="2. 安装 Vue-CLI"></a>2. 安装 Vue-CLI</h4><p>在准备好 NodeJS后，安装 Vue-CLI只需在命令行中通过以下指令：</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs shell">npm install -g @vue/cli<br></code></pre></td></tr></table></figure>

<h4 id="3-Vue项目-创建"><a href="#3-Vue项目-创建" class="headerlink" title="3. Vue项目-创建"></a>3. Vue项目-创建</h4><p>有两种方式可以创建 Vue 项目</p>
<ol>
<li>命令行 <code>vue create 项目名称</code></li>
<li>命令行 <code>vue ui</code> 在图形化界面里操作</li>
</ol>
<h3 id="3-2-Vue项目结构"><a href="#3-2-Vue项目结构" class="headerlink" title="3.2 Vue项目结构"></a>3.2 Vue项目结构</h3><p>基于Vue脚手架创建出来的工程，有标准的目录结构，如下：</p>
<p><img src="https://uni-pic-bed.oss-cn-hangzhou.aliyuncs.com/blog2024/202403061614148.png" srcset="/img/loading.gif" lazyload alt="image-20240306161409075"></p>
<p>Vue 项目启动方式，有两种，分别是图形化操作和命令行操作。</p>
<p><strong>方式1：图形化界面（VS code 软件）</strong></p>
<p><img src="https://uni-pic-bed.oss-cn-hangzhou.aliyuncs.com/blog2024/202403061621432.png" srcset="/img/loading.gif" lazyload alt="image-20240306162142339"></p>
<p><strong>方式2：在vue项目所在的终端输入命令行<code>npm run serve</code></strong></p>
<h3 id="3-3-Vue-项目常用配置"><a href="#3-3-Vue-项目常用配置" class="headerlink" title="3.3 Vue 项目常用配置"></a>3.3 Vue 项目常用配置</h3><p>Vue项目中最常用的配置就是修改服务器的端口号，具体在项目的根目录下的<code>vue.config.js</code>文件中修改，比如将服务器端口改为80：</p>
<figure class="highlight javascript"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><code class="hljs javascript"><span class="hljs-keyword">const</span> &#123; defineConfig &#125; = <span class="hljs-built_in">require</span>(<span class="hljs-string">&#x27;@vue/cli-service&#x27;</span>)<br><span class="hljs-variable language_">module</span>.<span class="hljs-property">exports</span> = <span class="hljs-title function_">defineConfig</span>(&#123;<br>  <span class="hljs-attr">transpileDependencies</span>: <span class="hljs-literal">true</span>,<br>  <span class="hljs-attr">devServer</span>:&#123;<br>    <span class="hljs-attr">port</span>: <span class="hljs-number">80</span><br>  &#125;<br>&#125;)<br></code></pre></td></tr></table></figure>

<h3 id="3-4-Vue-项目开发流程"><a href="#3-4-Vue-项目开发流程" class="headerlink" title="3.4 Vue 项目开发流程"></a>3.4 Vue 项目开发流程</h3><p><img src="https://uni-pic-bed.oss-cn-hangzhou.aliyuncs.com/blog2024/202403121208550.png" srcset="/img/loading.gif" lazyload alt="Vue2项目开发流程"></p>
<h2 id="参考资料"><a href="#参考资料" class="headerlink" title="参考资料"></a>参考资料</h2><p><a target="_blank" rel="noopener" href="https://www.bilibili.com/video/BV1m84y1w7Tb">https://www.bilibili.com/video/BV1m84y1w7Tb</a></p>

                
              </div>
            
            <hr/>
            <div>
              <div class="post-metas my-3">
  
    <div class="post-meta mr-3 d-flex align-items-center">
      <i class="iconfont icon-category"></i>
      

<span class="category-chains">
  
  
    
      <span class="category-chain">
        
  <a href="/categories/Web%E5%BC%80%E5%8F%91/" class="category-chain-item">Web开发</a>
  
  

      </span>
    
  
</span>

    </div>
  
  
    <div class="post-meta">
      <i class="iconfont icon-tags"></i>
      
        <a href="/tags/Web/" class="print-no-link">#Web</a>
      
        <a href="/tags/Vue/" class="print-no-link">#Vue</a>
      
    </div>
  
</div>


              
  

  <div class="license-box my-3">
    <div class="license-title">
      <div>Web 开发笔记1 | 前后端分离开发、Vue2项目开发</div>
      <div>http://example.com/2024/03/06/Web-开发笔记1-前后端分离开发、Vue2项目开发/</div>
    </div>
    <div class="license-meta">
      
        <div class="license-meta-item">
          <div>作者</div>
          <div>十一的蛋炒饭</div>
        </div>
      
      
        <div class="license-meta-item license-meta-date">
          <div>发布于</div>
          <div>2024年3月6日</div>
        </div>
      
      
      
        <div class="license-meta-item">
          <div>许可协议</div>
          <div>
            
              
              
                <a class="print-no-link" target="_blank" href="https://creativecommons.org/licenses/by/4.0/">
                  <span class="hint--top hint--rounded" aria-label="BY - 署名">
                    <i class="iconfont icon-by"></i>
                  </span>
                </a>
              
            
          </div>
        </div>
      
    </div>
    <div class="license-icon iconfont"></div>
  </div>



              
                <div class="post-prevnext my-3">
                  <article class="post-prev col-6">
                    
                    
                      <a href="/2024/03/07/%E8%87%AA%E6%88%91%E6%80%BB%E7%BB%9313-%E6%9C%88%E5%BA%A6%E6%80%BB%E7%BB%932023%E5%B9%B406%E6%9C%88-12%E6%9C%88/" title="自我总结13 | 月度总结2023年06月-12月">
                        <i class="iconfont icon-arrowleft"></i>
                        <span class="hidden-mobile">自我总结13 | 月度总结2023年06月-12月</span>
                        <span class="visible-mobile">上一篇</span>
                      </a>
                    
                  </article>
                  <article class="post-next col-6">
                    
                    
                      <a href="/2024/03/06/%E5%89%8D%E7%AB%AF%E5%9F%BA%E7%A1%80%E5%AD%A6%E4%B9%A03-AJAX%E3%80%81Axios/" title="前端基础学习3 | AJAX、Axios">
                        <span class="hidden-mobile">前端基础学习3 | AJAX、Axios</span>
                        <span class="visible-mobile">下一篇</span>
                        <i class="iconfont icon-arrowright"></i>
                      </a>
                    
                  </article>
                </div>
              
            </div>

            
          </article>
        </div>
      </div>
    </div>

    <div class="side-col d-none d-lg-block col-lg-2">
      
  <aside class="sidebar" style="margin-left: -1rem">
    <div id="toc">
  <p class="toc-header">
    <i class="iconfont icon-list"></i>
    <span>目录</span>
  </p>
  <div class="toc-body" id="toc-body"></div>
</div>



  </aside>


    </div>
  </div>
</div>





  



  



  



  



  







    

    
      <a id="scroll-top-button" aria-label="TOP" href="#" role="button">
        <i class="iconfont icon-arrowup" aria-hidden="true"></i>
      </a>
    

    
      <div class="modal fade" id="modalSearch" tabindex="-1" role="dialog" aria-labelledby="ModalLabel"
     aria-hidden="true">
  <div class="modal-dialog modal-dialog-scrollable modal-lg" role="document">
    <div class="modal-content">
      <div class="modal-header text-center">
        <h4 class="modal-title w-100 font-weight-bold">搜索</h4>
        <button type="button" id="local-search-close" class="close" data-dismiss="modal" aria-label="Close">
          <span aria-hidden="true">&times;</span>
        </button>
      </div>
      <div class="modal-body mx-3">
        <div class="md-form mb-5">
          <input type="text" id="local-search-input" class="form-control validate">
          <label data-error="x" data-success="v" for="local-search-input">关键词</label>
        </div>
        <div class="list-group" id="local-search-result"></div>
      </div>
    </div>
  </div>
</div>

    

    
  </main>

  <footer>
    <div class="footer-inner">
  
    <div class="footer-content">
       <a href="https://hexo.io" target="_blank" rel="nofollow noopener"><span>博客网站基于Hexo</span></a> <i class="iconfont icon-love"></i> <a href="https://github.com/fluid-dev/hexo-theme-fluid" target="_blank" rel="nofollow noopener"><span>主题Fluid</span></a> 
    </div>
  
  
  
  
</div>

  </footer>

  <!-- Scripts -->
  
  <script  src="https://lib.baomitu.com/nprogress/0.2.0/nprogress.min.js" ></script>
  <link  rel="stylesheet" href="https://lib.baomitu.com/nprogress/0.2.0/nprogress.min.css" />

  <script>
    NProgress.configure({"showSpinner":false,"trickleSpeed":100})
    NProgress.start()
    window.addEventListener('load', function() {
      NProgress.done();
    })
  </script>


<script  src="https://lib.baomitu.com/jquery/3.6.4/jquery.min.js" ></script>
<script  src="https://lib.baomitu.com/twitter-bootstrap/4.6.1/js/bootstrap.min.js" ></script>
<script  src="/js/events.js" ></script>
<script  src="/js/plugins.js" ></script>





  
    <script  src="/js/img-lazyload.js" ></script>
  




  
<script>
  var relativeDate = function() {
    var updatedTime = document.getElementById('updated-time');
    if (updatedTime) {
      var text = updatedTime.textContent;
      var reg = /\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:Z|[+-]\d{2}:\d{2})/;
      var matchs = text.match(reg);
      if (matchs) {
        var relativeTime = moment(matchs[0]).fromNow();
        updatedTime.textContent = text.replace(reg, relativeTime);
      }
      updatedTime.style.display = '';
    }
  };
  Fluid.utils.createScript('https://lib.baomitu.com/moment.js/2.29.4/moment.min.js', function() {
    if (!'zh-cn'.startsWith('en')) {
      Fluid.utils.createScript('https://lib.baomitu.com/moment.js/2.29.4/locale/zh-cn.min.js', function() {
        relativeDate();
      });
    } else {
      relativeDate();
    }
  });
</script>


  
<script>
  Fluid.utils.createScript('https://lib.baomitu.com/tocbot/4.20.1/tocbot.min.js', function() {
    var toc = jQuery('#toc');
    if (toc.length === 0 || !window.tocbot) { return; }
    var boardCtn = jQuery('#board-ctn');
    var boardTop = boardCtn.offset().top;

    window.tocbot.init(Object.assign({
      tocSelector     : '#toc-body',
      contentSelector : '.markdown-body',
      linkClass       : 'tocbot-link',
      activeLinkClass : 'tocbot-active-link',
      listClass       : 'tocbot-list',
      isCollapsedClass: 'tocbot-is-collapsed',
      collapsibleClass: 'tocbot-is-collapsible',
      scrollSmooth    : true,
      includeTitleTags: true,
      headingsOffset  : -boardTop,
    }, CONFIG.toc));
    if (toc.find('.toc-list-item').length > 0) {
      toc.css('visibility', 'visible');
    }

    Fluid.events.registerRefreshCallback(function() {
      if ('tocbot' in window) {
        tocbot.refresh();
        var toc = jQuery('#toc');
        if (toc.length === 0 || !tocbot) {
          return;
        }
        if (toc.find('.toc-list-item').length > 0) {
          toc.css('visibility', 'visible');
        }
      }
    });
  });
</script>


  <script src=https://lib.baomitu.com/clipboard.js/2.0.11/clipboard.min.js></script>

  <script>Fluid.plugins.codeWidget();</script>


  
<script>
  Fluid.utils.createScript('https://lib.baomitu.com/anchor-js/4.3.1/anchor.min.js', function() {
    window.anchors.options = {
      placement: CONFIG.anchorjs.placement,
      visible  : CONFIG.anchorjs.visible
    };
    if (CONFIG.anchorjs.icon) {
      window.anchors.options.icon = CONFIG.anchorjs.icon;
    }
    var el = (CONFIG.anchorjs.element || 'h1,h2,h3,h4,h5,h6').split(',');
    var res = [];
    for (var item of el) {
      res.push('.markdown-body > ' + item.trim());
    }
    if (CONFIG.anchorjs.placement === 'left') {
      window.anchors.options.class = 'anchorjs-link-left';
    }
    window.anchors.add(res.join(', '));

    Fluid.events.registerRefreshCallback(function() {
      if ('anchors' in window) {
        anchors.removeAll();
        var el = (CONFIG.anchorjs.element || 'h1,h2,h3,h4,h5,h6').split(',');
        var res = [];
        for (var item of el) {
          res.push('.markdown-body > ' + item.trim());
        }
        if (CONFIG.anchorjs.placement === 'left') {
          anchors.options.class = 'anchorjs-link-left';
        }
        anchors.add(res.join(', '));
      }
    });
  });
</script>


  
<script>
  Fluid.utils.createScript('https://lib.baomitu.com/fancybox/3.5.7/jquery.fancybox.min.js', function() {
    Fluid.plugins.fancyBox();
  });
</script>


  <script>Fluid.plugins.imageCaption();</script>

  <script  src="/js/local-search.js" ></script>





<!-- 主题的启动项，将它保持在最底部 -->
<!-- the boot of the theme, keep it at the bottom -->
<script  src="/js/boot.js" ></script>


  

  <noscript>
    <div class="noscript-warning">博客在允许 JavaScript 运行的环境下浏览效果更佳</div>
  </noscript>
</body>
</html>
